﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quotation
{
    public sealed class FutureQuotLevel : StrictFlagBase<string, FutureQuotLevel>
    {
        private FutureQuotLevel(string value) : base(value) { }

        public static readonly FutureQuotLevel Level1 = new FutureQuotLevel("F1");

        public static readonly FutureQuotLevel Level2 = new FutureQuotLevel("F2");

        /// <summary>
        /// 隐式类型转换
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static implicit operator FutureQuotLevel(string value)
        {
            if (value == null)
                return default(FutureQuotLevel);
            else
            {
                FutureQuotLevel rtn;
                FutureQuotLevel.TryConvert(value, out rtn);
                return rtn;
            }
        }
    }
}
